import {request} from "../../request";

export function getOrderdetailById(id){
    return request({
        url:`/lswms/orderdetail/${id}`,
        method:'get'
    })
}


export function getOrderdetailPage(data){
    return request({
        url:'/lswms/orderdetail/page',
        method:'put',
        data:data
    })
}

export function putOrderdetail(data){
    return request({
        url:'/lswms/orderdetail',
        method:'put',
        data:data
    })
}
export function postOrderdetail(data){
    return request({
        url:'/lswms/orderdetail',
        method:'post',
        data:data
    })
}

export function deleteOrderdetail(data){
    return request({
        url:`/lswms/orderdetail`,
        method:'delete',
        data:data
    })
}
export function exportOrderdetail(data){
    return request({
        url:`/lswms/orderdetail/export`,
        method:'get',
        data:data,
        responseType:'blob'
    })
}

// 分配
export function putAllocation(data){
    return request({
        url:'/lswms/orderdetail/allocation',
        method:'put',
        data:data
    })
}

// 发放
export function putRelease(data){
    return request({
        url:'/lswms/orderdetail/release',
        method:'put',
        data:data
    })
}

// 发货
export function putDelivery(data){
    return request({
        url:'/lswms/orderdetail/delivery',
        method:'put',
        data:data
    })
	}
// 关单
export function putClose(data){
    return request({
        url:'/lswms/orderdetail/close',
        method:'put',
        data:data
    })	
}